import http from "../utils/httpRequest"

let shopConfigTest = {
    name: "God店铺",
    status: 1,
    packingPrice: 1,
    sendingPrice: 1,
    sendingNeedPrice: 1000,
    startTime: "09:30",
    endTime: "22:00",
    relationPhones: "17058179046,17058179045",
    relationQQ: "2414402332",
    relationWeixin: "cyr2414402332",
    address: "四川农业大学2区好易购旁边",
    notice: "09:30-22:00为营业时间段!", // 店铺公告
    description: "God店铺~",
}

let shopListTest = [
    shopConfigTest
]

// 获取店铺配置信息
export function getShopConfig(params) {
    http({
        ...params,
        path: "/shop/config",
        testData: shopConfigTest,
    })
}

// 修改店铺配置信息
export function updateShopConfig(params) {
    http({
        ...params,
        method: "put",
        path: "/shop/config",
        testData: function () {
            shopConfigTest = params.data
            return true
        },
    })
}

export function getShopList(params) {
    http({
        ...params,
        path: "/system/shop/list",
        testData: JSON.parse(JSON.stringify(shopListTest))
    })
}